#ifndef __PRESSURE_KEYBOARD_H
#define __PRESSURE_KEYBOARD_H

#include "stm32f4xx.h"

typedef struct SubDevice_PressureKey_Struct{
    GPIO_TypeDef *gpioPort;
    GPIO_TypeDef *gpioPin;
    ADC_TypeDef *adcPort;
    uint8_t adcChannel;
}SubDevice_PressureKey;

typedef struct Device_Keyboard_Struct{
    SubDevice_PressureKey **pressureKeys;
    uint8_t nRows;
    uint8_t nCols;
    GPIO_TypeDef **rowsGpioPort;
    GPIO_TypeDef **colsGpioPort;
    uint16_t *rowsGpioPin;
    uint16_t *colsGpioPin;
}Device_PressureKeyboard;

typedef struct KeyPairStruct{
    uint8_t row;
    uint8_t col;
    uint16_t pressureData;
    uint8_t valid;
}KeyData;

Device_PressureKeyboard     BSP_PressureKeyboard_CreateMemory(int nRows, int nCols);
KeyData                     BSP_PressureKeyboard_GetCurrentInput(volatile Device_PressureKeyboard *dv);

#endif
